<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Base extends CI_Controller {

    var $enable_cache = true;
    var $enable_session = true;

    public function __construct() {
        parent::__construct();

        /*
          Si tiene IE 6 y 7 mandamos a Instalar Chrome Frame
         */

        if (!strpos($_SERVER['HTTP_USER_AGENT'], "chromeframe")
                AND $this->agent->browser() == 'Internet Explorer'
                AND in_array($this->agent->version(), array('6.0', '7.0'))
        ) {
            redirect('ie/?url=' . current_url());
        }
    }

    function _remap($method) {
        $param_offset = 2;

        // Default to index
        if (!method_exists($this, $method)) {
            // We need one more param
            $param_offset = 1;
            $method = 'index';
        }

        // Since all we get is $method, load up everything else in the URI
        $params = array_slice($this->uri->rsegment_array(), $param_offset);

        // Call the determined method with all params
        call_user_func_array(array($this, $method), $params);
    }

}

?>